package project.mafia.network;

import java.io.Serializable;
/**
 * 
 * @author RakuSe7en
 * @category Packet
 * 
 */
public class Packet implements Serializable{
	private static final long serialVersionUID = -7101276067713874988L;
	
	
	/*
	 * Packet Datas
	 */
	private int type;
	private String[] data;
	
	
	/*
	 * Constructor
	 */
	public Packet(int type){
		setType(type);
	}
	public Packet(int type,String data) {
		setType(type);
		this.setData(new String[]{data});
	}
	public Packet(int type,String data1,String data2) {
		setType(type);
		this.setData(new String[]{data1,data2});
	}
	public Packet(int type,String data1,String data2,String data3) {
		setType(type);
		this.setData(new String[]{data1,data2,data3});
	}
	
	
	/*
	 * Get,Set
	 */
	
	/**
	 * @author RakuSe7en
	 * @return
	 * Type definition </br>
	 * 0    Make connection </br>
	 * 1    Disconnect </br>
	 * 2.1  Nickname </br>
	 * 2.2  Job </br>
	 * 2.3  Condition / dead or alive </br>
	 * 3    Chatting data. </br>
	 * 3.1  NickName
	 * 3.2  Message
	 * 4    Timer </br>
	 * 5.1  Server/Client
	 */
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String[] getData() {
		return data;
	}
	public void setData(String[] data) {
		this.data = data;
	}
}
